﻿#include "setcontrolstyle.h"

//--------------------------------------------------------------------
// 窗体尺寸
const QColor sewcolorYel = QColor(Qt::darkYellow);//黄色
const QColor sewcolorGreen = QColor(0x35,0xC0,0x5C);//绿色
const QColor sewcolorGray = QColor(Qt::lightGray);
const QColor sewcolorblue = QColor(0,128,255);//蓝色

double getFactoryX()
{
    double factoryX = 1.0;
    switch (g_emResolut)
    {
    case resolution1910:
        factoryX = 1920.0/GLB_SCR_WIGHT;
        break;
    case resolution1006:
        factoryX = 1024.0/GLB_SCR_WIGHT;
        break;
    case resolution0804:
        factoryX = 800.0/GLB_SCR_WIGHT;
        break;
    default:
        break;
    }
    return factoryX;
}

double getFactoryY()
{
    double factoryY = 1.0;

    switch (g_emResolut)
    {
    case resolution1910:
        factoryY = 1080.0/GLB_SCR_HEIGHT;
        break;
    case resolution1006:
        factoryY = 600.0/GLB_SCR_HEIGHT;
        break;
    case resolution0804:
        factoryY = 480.0/GLB_SCR_HEIGHT;
        break;
    default:
        break;
    }
    return factoryY;
}

//--------------------------------------------------------------------
// 圆角
QString borderRadius()
{
    int r = 4;
#ifdef Q_OS_WIN
    r = 4;
#endif
#ifdef Q_OS_LINUX
    r = 4;
#endif

    r *= getFactoryY();

    QString radius=QString::number(r,10);
    return radius;
}
//--------------------------------------------------------------------
// 字体

#define FONTTYPE    "Microsoft YaHei"

#define FONTBOLD    QFont::Bold //加粗
#define FONTNORMAL  QFont::Normal //正常

// 大号字体(标题)
QFont fontSize_L()
{
    QFont size(FONTTYPE,g_fontsize + 2, FONTNORMAL);
    size.setPointSize(size.pointSize()*getFactoryY());
    return size;
}

// 中号字体(正文)
QFont fontSize_M()
{
    QFont size(FONTTYPE,g_fontsize, FONTNORMAL);
    size.setPointSize(size.pointSize()*getFactoryY());
    return size;
}

// 小号字体(注释)
QFont fontSize_S()
{
    QFont size(FONTTYPE,g_fontsize, FONTNORMAL);
    size.setPointSize(size.pointSize()*getFactoryY());
    return size;
}

//-----------------------------------------------------------
// 字体颜色

// 标题栏文本字体颜色
QString titleTextColour()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 255);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 255);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}

// 标题栏文本字体颜色-绿色
QString titleTextColour_Green()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(0, 255, 0);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(0, 255, 0);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}
// 标题栏文本字体颜色-红色
QString titleTextColour_Red()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 0, 0);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 0, 0);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}
// 标题栏文本字体颜色-黄色
QString titleTextColour_Yellow()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 0);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 0);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}
// 主图标文本字体颜色
// 主窗体左侧主按钮
QString mainIconTextColour()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 255);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 255);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}

// 分类图标文本字体颜色
// 主界面中间分类图标
QString classIconTextColour()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(57, 57, 57);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(57, 57, 57);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}

// 状态栏文本字体颜色
// 主界面右侧状态栏
QString stateTextColour()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 255);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 255);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}

// 警示文本字体颜色
QString warnTextColour()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 239, 0);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 239, 0);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}


// 弹窗标题栏文本字体颜色
QString windowTitleTextColour()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 255);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 255);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}


// 普通文本 字体颜色
// 参数等界面文字,页码颜色
QString commonTextColour()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 255);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(255, 255, 255);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}

// 注释文本 字体颜色
// 参数等界面副标题文字
QString noteTextColour()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(128, 128, 128);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(128, 128, 128);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}


// 传感器信号 指示灯颜色
QString ledTextColour()
{
    QString colour = "background-color: rgba(0, 0, 0, 0);color: rgb(63, 193, 216);";

    switch (g_emTheme)
    {
    case theme1:
        colour = "background-color: rgba(0, 0, 0, 0);color: rgb(234, 170, 58);";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}

//-----------------------------------------------------------
// 绘图颜色
// 未缝制跨步颜色
u32 getNoJumpColour()
{
    u32 colour = 0;

    switch (g_emTheme)
    {
    case theme1://黄色
        colour = qRgb(sewcolorYel.red(),sewcolorYel.green(),sewcolorYel.blue());
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}

// 缝制后跨步颜色
u32 getJumpedColour()
{
    u32 colour = 0;

    switch (g_emTheme)
    {
    case theme1://黄色
        colour = qRgb(sewcolorYel.red(),sewcolorYel.green(),sewcolorYel.blue());
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}

// 未缝制颜色颜色
u32 getNoSewColour()
{
    u32 colour = 0;

    switch (g_emTheme)
    {
    case theme1:
        colour = qRgb(sewcolorGray.red(),sewcolorGray.green(),sewcolorGray.blue());
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}

// 缝制后颜色颜色
u32 getSewedColour()
{
    u32 colour = 0;

    switch (g_emTheme)
    {
    case theme1://蓝色
        colour = qRgb(sewcolorblue.red(),sewcolorblue.green(),sewcolorblue.blue());
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return colour;
}

//-----------------------------------------------------------
// 控件样式
// 文本按钮样式
QString textButtonStyle()
{
    QFont  size = fontSize_L();
    QString pSize = QString::number(size.pointSize() + 5);
    QString style = "QPushButton{border-radius:" + borderRadius() + "px;font-size:"+ pSize +"px;font-family:"+FONTTYPE+";}";

    switch (g_emTheme)
    {
    case theme1:
        // 银色按钮,黑字
        style += "QPushButton{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(255, 255, 255), stop:1 rgb(215, 243, 254));color:rgb(0, 0, 0)}";
        style += "QPushButton:pressed{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(217, 222, 224), stop:1 rgb(191,213,223));}";
        style += "QPushButton:disabled{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(230, 230, 230), stop:1 rgb(182,182,182));}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return style;
}

// 数字按钮样式
QString numButtonStyle()
{
    QFont  size = fontSize_L();
    QString pSize = QString::number(size.pointSize() + 5);
    QString style = "QPushButton{border-radius:" + borderRadius() + "px;font-size:"+ pSize +"px;font-family:"+FONTTYPE+";}";

    switch (g_emTheme)
    {
    case theme1:
        // 银色按钮,黑字
        style += "QPushButton{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(255, 255, 255), stop:1 rgb(215, 243, 254));color:rgb(57, 57, 57);color:rgb(0, 0, 0)}";
        style += "QPushButton:pressed{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(217, 222, 224), stop:1 rgb(191,213,223));color:rgb(57, 57, 57);}";
        style += "QPushButton:disabled{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(230, 230, 230), stop:1 rgb(182,182,182));color:rgb(57, 57, 57);}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return style;
}

// 机头间距按钮样式
QString headButtonStyle()
{
    QFont  size = fontSize_L();
    QString pSize = QString::number(size.pointSize() + 5);
    QString style = "QPushButton{border-radius:" + borderRadius() + "px;font-size:"+ pSize +"px;font-family:"+FONTTYPE+";color: rgb(255, 255, 255);}";

    switch (g_emTheme)
    {
    case theme1:
        style += "QPushButton{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(59, 182, 205), stop:1 rgb(59, 182, 205));}";
        style += "QPushButton:pressed{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(59, 182, 205), stop:1 rgb(59, 182, 205));}";
        style += "QPushButton:disabled{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(59, 182, 205), stop:1 rgb(59, 182, 205));}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return style;
}

// 主图标样式
// 主窗体左侧主按钮
QString mainIconStyle()
{
    QString style = "QPushButton{border-radius:" + borderRadius() + "px;}";

    switch (g_emTheme)
    {
    case theme1:
        // 橙色按钮,白字
        style += "QPushButton{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(65,197,220), stop:1 rgb(57,176,198));}";
        style += "QPushButton:disabled{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(234, 234, 234), stop:1 rgb(176,176,176));}";
        style += "QPushButton:checked{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(247, 180, 61), stop:1 rgb(222, 162, 55));}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return style;
}

// 分类图标样式
// 主界面中间分类图标
QString classIconStyle()
{
    QString style = "QPushButton{border-radius:" + borderRadius() + "px;}";

    switch (g_emTheme)
    {
    case theme1:
        // 橙色按钮,白字
        style +=  "QPushButton{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(247, 180, 61), stop:1 rgb(222, 162, 55));color:rgb(255,255,255);}";
        style += "QPushButton:pressed{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(222, 196, 128), stop:1 rgb(213,125,54));color:rgb(255,255,255);}";
        style += "QPushButton:disabled{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(227, 227, 227), stop:1 rgb(177,177,177));color:rgb(255,255,255);}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return style;
}

// 确认图标样式
QString confirmIconStyle()
{
    QString style = "QPushButton{border-radius:" + borderRadius() + "px;}";

    switch (g_emTheme)
    {
    case theme1:
        // 橙色按钮,白字
        style +=  "QPushButton{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(247, 180, 61), stop:1 rgb(222, 162, 55));color:rgb(255,255,255);}";
        style += "QPushButton:pressed{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(222, 196, 128), stop:1 rgb(213,125,54));color:rgb(255,255,255);}";
        style += "QPushButton:disabled{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(227, 227, 227), stop:1 rgb(177,177,177));color:rgb(255,255,255);}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return style;
}

// 返回图标样式
// 右上角图标
QString backIconStyle()
{
    QString style = "QPushButton{border-radius:" + borderRadius() + "px;}";

    switch (g_emTheme)
    {
    case theme1:
        // 绿色按钮,黑字
        style += "QPushButton{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(139, 195, 163), stop:1 rgb(86,172,123));}";
        style += "QPushButton:pressed{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(105, 147, 123), stop:1 rgb(84,138,107));}";
        style += "QPushButton:disabled{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(227, 227, 227), stop:1 rgb(177,177,177));color:rgb(255,255,255);}";
        style += "QPushButton:checked{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(105, 147, 100), stop:1 rgb(84,138,90));}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return style;
}

// 标题图标
// 左上角图标
QString titleIconStyle(QString pic)
{
    QString style = "QPushButton{border-radius:" + borderRadius() + "px;}";

    switch (g_emTheme)
    {
    case theme1:
        style += "QPushButton{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(65,197,220), stop:1 rgb(57,176,198));border-image: url(" + pic + ");border:0px;outline: none;}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }
    return style;
}

// 选项卡样式
// 主控升级
QString optionsIconStyle()
{
    QString style = "QPushButton{border-radius:0px;}";

    switch (g_emTheme)
    {
    case theme1:
        style += "QPushButton{border:0px;text-align:left;background-color:rgba(255, 255, 255, 0);color: rgb(255, 255, 255);}";
        style += "QPushButton:checked{background-color: rgba(255, 255, 255, 50);}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }
    return style;
}

// 进度条样式
QString progressStyle()
{
    QString style = "QProgressBar{border-radius:" + borderRadius() + "px;}";

    switch (g_emTheme)
    {
    case theme1:
        style += "QProgressBar{border:0px;}QProgressBar::chunk{background-color: rgb(255, 255, 255);}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }
    return style;
}

// 透明样式
//透明色、无焦点、无边框
QString transparentStyle()
{
    QString style = "";

//    style += "outline:none;border:0px;background-color: rgba(255, 255, 255, 0);border-radius:" + borderRadius() + "px;";
    style += "outline:none;border:0px;background-color: rgba(255, 255, 255, 0);";
    return style;
}

//-----------------------------------------------------------
SetStyle::SetStyle(QObject *parent) : QObject(parent)
{
    m_uiName.clear();
}

void SetStyle::setUiName(QString uiName)
{
    m_uiName = uiName;
}

QString SetStyle::getStyleSheet(QString controlName)
{
    //样式表格式 <分辨率><主题><窗体名称><图片名称>
    //例如图片路径  :/images/MainWidget/ButtonConnect_logo.png
    QString style;
    style = "background-color: rgba(245, 245, 245, 0);color: rgb(255, 255, 255);border:0px;border-image:url(:/images/";

    style += m_uiName + "/";
    style += controlName + "_logo.png);";

    return style;
}

QString SetStyle::getStyleSheet1(QString controlName)
{
    //样式表格式 <分辨率><主题><窗体名称><图片名称>
    //例如图片路径  :/images/1920x1080/theme1/EmbMainWidget/ButtonConnect_logo.png
    QString style;
    style = "background-color: rgba(245, 245, 245, 0);color: rgb(255, 255, 255);border:0px;border-image:url(:/images/";

    //分辨率
    QString str;
    str.clear();
    switch (g_emResolut)
    {
    case resolution1910:
        str = "_1910";
        break;
    case resolution1006:
        str = "_1006";
        break;
    case resolution0804:
        str = "_1006";
        break;
    default:
        break;
    }

    style += m_uiName + "/";
    style += controlName + str + "_logo.png);";

    return style;
}

QString SetStyle::getBorderImageStyleSheet(QString controlName)
{
    //样式表格式 <分辨率><主题><窗体名称><图片名称>
    //例如图片路径  :/images/1920x1080/theme1/EmbMainWidget/ButtonConnect_logo.png
    QString style;
    style = "background-color: rgba(245, 245, 245, 0);color: rgb(255, 255, 255);border:0px;border-image:url(:/images/";

    //分辨率
    QString str;
    str.clear();
    switch (g_emResolut)
    {
    case resolution1910:
        str = "_1910";
        break;
    case resolution1006:
        str = "_1006";
        break;
    case resolution0804:
        str = "_1006";
        break;
    default:
        break;
    }

    style += m_uiName + "/";
    style += controlName + str + "_logo.png);";

    return style;
}

QString SetStyle::getTopStyleSheet(QString controlName)
{
    //样式表格式 <分辨率><主题><窗体名称><图片名称>
    //例如  :/images/1920x1080/theme1/EmbMainWidget/buttonPatternSet_logo
    QString style = ":/images/";

    style += m_uiName + "/";
    style += controlName + "_logo.png";

    return style;
}

QString SetStyle::getBottomStyleSheet(QString parentName)
{
    //样式表格式 <分辨率><主题><窗体名称><图片前缀>
    //例如  :/images/EmbMainWidget/frameMainFunction
    QString style = ":/images/";

    style += m_uiName + "/";
    style += parentName;

    return style;
}

QString SetStyle::getBottomStyleSheet1(QString parentName)
{
    //样式表格式 <分辨率><主题><窗体名称><图片前缀>
    //例如  :/images/EmbMainWidget/frameMainFunction
    QString style = ":/images/";

    //分辨率
    QString str;
    str.clear();
    switch (g_emResolut)
    {
    case resolution1910:
        str = "1910_";
        break;
    case resolution1006:
        str = "1006_";
        break;
    case resolution0804:
        str = "1006_";
        break;
    default:
        break;
    }

    style += m_uiName +"/"+str;
    style += parentName;

    return style;
}


QString SetStyle::getSharedStyleSheet()
{
    //样式表格式 <分辨率><主题><窗体名称><图片名称>
    //例如图片路径  :/images/1920x1080/theme1/EmbMainWidget/ButtonConnect_logo.png
    QString style;
    style = "background-color: rgba(245, 245, 245, 0);color: rgb(255, 255, 255);border:0px;border-image:url(:/images/";

    //分辨率
    QString str;
    str.clear();
    switch (g_emResolut)
    {
    case resolution1910:
        str = "_1910";
        break;
    case resolution1006:
        str = "_1006";
        break;
    case resolution0804:
        str = "_1006";
        break;
    default:
        break;
    }

    style += "SharedIcon/WidgetFrameBack"+ str +"_logo.png);";

    return style;
}

QString SetStyle::getSharedTopStyleSheet(QString controlName)
{
    //样式表格式 <分辨率><主题><窗体名称><图片名称>
    //例如  :/images/1920x1080/theme1/EmbMainWidget/buttonPatternSet_logo
    QString style = ":/images/";
    style += "SharedIcon/";
    style += controlName + "_logo.png";

    return style;
}

QString SetStyle::getSharedBottomStyleSheet(QString parentName)
{
    //样式表格式 <分辨率><主题><窗体名称><图片前缀>
    //例如  :/images/1920x1080/theme1/EmbMainWidget/frameMainFunction
    QString style = ":/images/";
    style += "SharedIcon/";
    style += parentName;

    return style;
}

/**
 * @brief   快捷按钮翻页
 * @return
 */
QString flippingStyle()
{
    QString style = "QPushButton{border-radius:" + borderRadius() + "px;}";

    switch (g_emTheme)
    {
    case theme1:
        // 绿色按钮,黑字
        style += "QPushButton{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(139, 195, 163), stop:1 rgb(86,172,123));}";
        style += "QPushButton:pressed{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(105, 147, 123), stop:1 rgb(84,138,107));}";
        style += "QPushButton:disabled{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(227, 227, 227), stop:1 rgb(177,177,177));color:rgb(255,255,255);}";
        style += "QPushButton:checked{background-color: qlineargradient(spread:pad, x1:0.5 y1:0, x2:0.5, y2:1, stop:0 rgb(105, 147, 100), stop:1 rgb(84,138,90));}";
        break;
    case theme2:
        break;
    case theme3:
        break;
    default:
        break;
    }

    return style;
}
